Macros: functions, keywords and syntax

The formula of a macro usually includes the name of the function, and, between brackets, different settings separated by semicolons: the budget code to which the calculation is applied, and the input settings specific to this function (start date, end date, percentage...).

Preset Functions:

Keyword Operation
PDISTR

Periodic Distribution

 

Example:

PDISTR(VENA;DATE;(1M:25%);(2M:25%);(3M:25%);(4M:25%))

In this example, all the amounts of the specified budget code are distributed in four amounts spaced one month apart (without discrepancy).

You can use this function for a sale or a pruchase broken down in n payments.

ADISTR

Analytic Distribution

 

Example:

ADISTR(VENP;(VENA:80%);(VENB:20%))

In this example, the amount of the specified budget code is broken down in two other budget codes.

DISC

Time lag

 

Example:

DISC(CHS;100%;DATE;ENDOFQUARTER)
DISC(ELEC;100%;DATE;ENDOFMONTH;2)

IF

Logical Condition

 

Example:

IF(CA>1000000;CA*10%;CA*5%)
In this example, a premium is calculated based on the turnover.